<?php
  require_once 'lib/swift_required.php';
  $SwiftMailer->connection  = 'smtp';
  $SwiftMailer->smtp_host   = 'smtp.gmail.com';
  $SwiftMailer->smtp_type   = 'tls'; 
  $SwiftMailer->username  = 'eramis@gmail.com';
  $SwiftMailer->password  = '29to74to';
  if($SwiftMailer->connect())
    {
      $SwiftMailer->addTo('to',"eramis@gmail.com","CraZyLeGs");
      $SwiftMailer->addTo('from',"eramis@gmail.com","some user");
      if(!$SwiftMailer->sendView("SwiftComponent::sendView Exemple","confirm",'both'))
        {
          echo "The mailer failed to Send. Errors:";
          pr($SwiftMailer->errors());    
        }
      echo "Log:";
      pr($SwiftMailer->transactions());
    }
  else
    {
      echo "The mailer failed to connect. Errors:";
      pr($SwiftMailer->errors());
    } 
?>		   